package com.sqx.modules.creation.controller.app;

import com.sqx.common.utils.Result;
import com.sqx.modules.app.annotation.Login;
import com.sqx.modules.creation.entity.dto.CreationGoodDto;
import com.sqx.modules.creation.service.CreationGoodService;
import lombok.Data;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/app/creation/good")
public class AppCreationGoodController {
    @Autowired
    private CreationGoodService creationGoodService;

    /**
     * 评论或回复点赞/取消点赞
     * @param creationGood
     * @return
     */
    @Login
    @PostMapping("/insertCreationGood")
    private Result insertCreationGood(@RequestAttribute("userId")Long userId, @RequestBody CreationGoodDto creationGood) {
        return creationGoodService.insertCreationGood(userId,creationGood);
    }


}
